// These parameters are not the values retrieved with
// get_transformed_position() and get_transformed_size(),
// as windowClone might be moving.
- // See Workspace._fadeInWindowOverlay
+ // See Workspace._showWindowOverlay
updatePositions: function(cloneX, cloneY, cloneWidth, cloneHeight) {
let button = this.closeButton;
let title = this.title;
let slots = this._computeAllWindowSlots(visibleClones.length);
visibleClones = this._orderWindowsByMotionAndStartup(visibleClones, slots);
+ let currentWorkspace = global.screen.get_active_workspace();
+ let isOnCurrentWorkspace = this.metaWorkspace == currentWorkspace;
+
for (let i = 0; i < visibleClones.length; i++) {
let slot = slots[i];
let clone = visibleClones[i];
if (overlay)
overlay.hide();
- if (animate) {
+ if (animate && isOnCurrentWorkspace) {
if (!metaWindow.showing_on_its_workspace()) {
/* Hidden windows should fade in and grow
* therefore we need to resize them now so they
time: Overview.ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: Lang.bind(this, function() {
- this._fadeInWindowOverlay(clone, overlay);
+ this._showWindowOverlay(clone, overlay, true);
})
});
} else {
clone.actor.set_position(x, y);
clone.actor.set_scale(scale, scale);
- this._fadeInWindowOverlay(clone, overlay);
+ this._showWindowOverlay(clone, overlay, isOnCurrentWorkspace);
}
}
},
}
},
- _fadeInWindowOverlay: function(clone, overlay) {
+ _showWindowOverlay: function(clone, overlay, fade) {
if (clone.inDrag)
return;
if (overlay) {
overlay.updatePositions(cloneX, cloneY, cloneWidth, cloneHeight);
- overlay.fadeIn();
+ if (fade)
+ overlay.fadeIn();
+ else
+ overlay.show();
}
},
- _fadeInAllOverlays: function() {
+ _showAllOverlays: function() {
+ let currentWorkspace = global.screen.get_active_workspace();
for (let i = 0; i < this._windows.length; i++) {
let clone = this._windows[i];
let overlay = this._windowOverlays[i];
if (this._showOnlyWindows != null && !(clone.metaWindow in this._showOnlyWindows))
continue;
- this._fadeInWindowOverlay(clone, overlay);
+ this._showWindowOverlay(clone, overlay, this.metaWorkspace == currentWorkspace);
}
},
showWindowsOverlays: function() {
this._windowOverlaysGroup.show();
- this._fadeInAllOverlays();
+ this._showAllOverlays();
},
hideWindowsOverlays: function() {
// Animates the return from Overview mode
zoomFromOverview : function() {
+ let currentWorkspace = global.screen.get_active_workspace();
+
this.leavingOverview = true;
this._hideAllOverlays();
this._overviewHiddenId = Main.overview.connect('hidden', Lang.bind(this,
this._doneLeavingOverview));
+ if (this._metaWorkspace == currentWorkspace)
+ return;
+
// Position and scale the windows.
for (let i = 0; i < this._windows.length; i++) {
let clone = this._windows[i];